package stream;

import java.util.ArrayList;
import java.util.List;
import java.util.Collection;
public class MyArrayList<T> {
    private T[] data;
    private int size;

    public MyArrayList(int initialCapacity){data=(T[])new Object[initialCapacity];}

    public MyArrayList(){
        this(10);
    }
    public boolean add(T t){
        if(size==data.length){
            return false;
        }
        data[size++]=t;
        return true;
    }
    public T get(int index){
        return data[index];
    }




}
